import service from "@/utils/service";

// 批量导入汽车站
export const getAllAnnualReviewRecord = (data: any) => {
  return service({
    url: "/xiechetong/xctAnnualReviewRecord/page",
    method: "post",
    data
  });
};

// 新增
export const addAnnualReviewRecordApi = (data: any) => {
  return service({
    url: "/xiechetong/xctAnnualReviewRecord/add",
    method: "post",
    data
  });
};

// 更新
export const updateAnnualReviewRecordApi = (data: any) => {
  return service({
    url: "/xiechetong/xctAnnualReviewRecord/update",
    method: "put",
    data
  });
};

//获取年审记录-修改信息
export const modifyAnnualReviewVehicleFile = (data: any) => {
  return service({
    url: "/xiechetong/xctAnnualReviewRecord/modify",
    method: "put",
    data
  });
};
//获取年审维护记录列表
export const getAnnualauditFee = (data: any) => {
  return service({
    // url: '/xiechetong/xctAnnualCostRecord/page'
    url: "/xiechetong/xctAnnualCostRecord/page",
    method: "post",
    data
  });
};

//获取年审配额记录（分页）
export const getAnnualCostRecordPage = (data: any) => {
  return service({
    url: "/xiechetong/xctAnnualCostRecord/permission-page",
    method: "post",
    data
  });
};

//年审配额充值
export const rechargeCost = (data: any) => {
  return service({
    url: "/xiechetong/xctAnnualCostRecord/recharge_cost",
    method: "post",
    data
  });
};
// 查询年审费用
export const getAnnualAuditFeeDetails = () => {
  return service({
    url: "/xiechetong/xctCostInfo/annual-get-detail",
    method: "get",
    // headers: {
    //   "Content-Type": "application/x-www-form-urlencoded"
    // }
  });
};
// 查询年审车辆列表
export const getAnnualReviewCar = (data: any) => {
  return service({
    url: "/xiechetong/annualVehicle/page",
    method: "post",
    data
  });
};

//年审车辆档案新增
export const addAnnualVehicle = (data: any) => {
  //console.log(data)
  return service({
    url: "/xiechetong/annualVehicle/insert",
    method: "post",
    data
  });
};
//年审车辆档案编辑
export const UpdateAnnualVehicle = (data: any) => {
  //console.log(data)
  return service({
    url: "/xiechetong/annualVehicle/update",
    method: "put",
    data
  });
};
///年审车辆档案删除xiechetong/annualVehicle/del/记录ID
export const delAnnualVehicle = (data: any) => {
  // console.log(data)
  return service({
    url: "xiechetong/annualVehicle/del/" + data,
    method: "delete",
    // data
  });
};
//获取年审-预审车辆信息
export const getAnnualReviewVehicleInfo = (data: any) => {
  // console.log(data)
  return service({
    url: "/xiechetong/xctAnnualReviewRecord/query/" + data,
    method: "delete",
    // data
  });
};

// /xiechetong/xctAnnualReviewRecord/query-sign/受理编号
// 获取预审材料列表
export const getAnnualReviewRecordBySign = (sign: string) => {
  return service({
    url: "/xiechetong/xctAnnualReviewRecord/query/" + sign,
    method: "get",
  });
};

// 确认预审
// /xiechetong/xctAnnualReviewRecord/prequalification
export const confirmAnnualReviewRecord = (data: any) => {
  return service({
    url: "/xiechetong/xctAnnualReviewRecord/prequalification",
    method: "put",
    data
  });
};
// 年审-进度，获取不同状态的审验材料列表 , 
// /xiechetong/xctAnnualVerificationMaterials/query-status/受理编号/状态
export const getViewAnnualReviewProgress = (acceptanceNumber: string,status: string) => {
  return service({
    url: "/xiechetong/xctAnnualVerificationMaterials/query-status/"+acceptanceNumber +"/"+ status,
    method: "get",
  });
};

//年审-进度,查看不同状态的审核材料详情
export const getAnualVerificationMaterials = (acceptanceNumber: string) => {
  return service({
    url:"/xiechetong/xctAnnualVerificationMaterials/getById/"+acceptanceNumber,
    
    method: "get",

  });
};

// 审核人-审核材料列表
export const getAnnualViewCheckCarList = (acceptanceId: string) => {
  return service({
    // /xiechetong/xctAnnualReviewRecord/query-sign/受理编号
    url: "/xiechetong/xctAnnualReviewRecord/query-sign/"+acceptanceId,
    method: "get",
  });
};
//审核人-提交审核
export const submitAnnualVerificationMaterials = (data: any) => {
  return service({
    url: "/xiechetong/xctAnnualVerificationMaterials/sign",
    method: "post",
    data,
  });
};

// 作废年审记录
// /xiechetong/xctAnnualReviewRecord/update-cancel/记录ID
export const recordUpdateCancel = (id: any) => {
  return service({
    url: "/xiechetong/xctAnnualReviewRecord/update-cancel/"+ id,
    method: "put"
  });
};
//提交复审/xiechetong/xctAnnualVerificationMaterials

export const annualVerificationMaterials = (data: any) => {
  return service({
    url: "/xiechetong/xctAnnualVerificationMaterials/confirm-re-examination",
    method: "put",
    data
  });
};
// 年审配额-获取年审所有检测站配额列表
//xiechetong/xctAnnualVerificationMaterials/get-all-materiais/状态
export const GetAllMateriaisAnnualVerificationMaterials = (status: any) => {
  console.log(status,111)
  return service({
    url: "/xiechetong/xctAnnualVerificationMaterials/get-all-materiais/"+ status.status,
    method: "get"
  });
};